package jdkDemo;

public class Test5 {
	public static void main(String[] args) throws Exception {
//		func(50, 100);
		int times = 0;
		
		for(int i=0; i<100; i++){
			int n = (int)((Math.random()*10)+1);
			if(n == 5) 
				times++;
		}
		System.out.println(times);
		
		
	}
	
	
	public static int func (int s, int e) throws Exception{
		if(e>=s){
			throw new Exception("the end must large than the start");
		}
		
		int num = (int) Math.round((Math.random()*(e-s+1)+s));
		return num;
		
	}
	
	
}
